/*
 * @Author: captern
 * @@Gitee: https://gitee.com/captern
 * @@websit: http://www.captern.cn/
 * @Date: 2021-02-01 18:13:27
 * @LastModifiedBy: captern
 * @LastEditTime: 2021-02-01 18:13:39
 * @Description:
 */
export default {
	getRect(selector) {
		return new Promise(resolve => {
			let view = uni.createSelectorQuery().select(selector);
			view.fields(
				{
					size: true,
					rect: true,
					scrollOffset: true
				},
				res => {
					resolve(res);
				}
			).exec();
		});
	}
};
